package com.itheima.extendsconstructor;

public class Test1 {

    public static void main(String[] args) {

        //子类构造器的应用场景
        Consultant c1 = new Consultant("张三", 20, "男", 100);
        System.out.println(c1.getName());
        System.out.println(c1.getAge());
        System.out.println(c1.getGender());
        System.out.println(c1.getNumber());

        System.out.println("======");

        Teacher t1 = new Teacher("李四", 30, "女", "教授");
        System.out.println(t1.getName());
        System.out.println(t1.getAge());
        System.out.println(t1.getGender());
        System.out.println(t1.getTitle());

    }
}
